/*
 *      Created on: Mar 8, 2011
 *      Author: topcoder
 */
#include <Quantity.h>
#include <iostream>
using namespace std;

Quantity::Quantity(const unsigned int amount, const Unit unit)
:amountInBaseUnit_m(unit.convertToBaseUnitAmount(amount)), unit_m(unit)
{
}

bool Quantity::operator==(const Quantity& quantity)const
{  
    return  amountInBaseUnit_m == quantity.amountInBaseUnit_m;
}

bool Quantity::operator!=(const Quantity& quantity)const
{
    return  !(*this == quantity);
}




